/******************************************************************
 * Created by: DO HOANG HAI                                       
 * Date of Creation: 23rd/Sep/2007
 * Date of last modification: 23rd/Sep/2007
 *                                                                
 * Description: Used for informing for warning users with only 1 button
 * (OK) to close the program.
 ******************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Pbdms.Common.GUI
{
    public partial class MsgBoxOneButton : Form
    {
        /// <summary>
        /// Inform or Give a warning to user.
        /// </summary>
        /// <param name="msg"></param>
        /// <param name="c">'I' if the dialog box is to inform user, 
        /// 'W' if the dialog box is to give a warning</param>
        public MsgBoxOneButton(String msg, char c)
        {
            InitializeComponent();
            this.lblMessage.Text = msg;
            Pbdms.Common.Global.paintBackGround(this);
            if (c == 'W')
            {
                picImageC.Image = global::Pbdms.Common.Properties.Resources.warning;
                this.Text = "Pbdms - Warning";
            }
            else
            {
                picImageC.Image = global::Pbdms.Common.Properties.Resources.inform;
                this.Text = "Pbdms - Inform";
            }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}